<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
      <!-- <el-form-item label="报表编号" prop="code">
        <el-input
          v-model="queryParams.code"
          placeholder="请输入报表编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <!-- <el-form-item label="报表名称" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入报表名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="月份" prop="reportMonth">
        <el-date-picker
          :editable="false"
          clearable
          size="small"
          v-model="queryParams.reportMonth"
          type="monthrange"
          range-separator="至"
          start-placeholder="开始月份"
          end-placeholder="结束月份"
          value-format="yyyy-MM"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="所属仓库" prop="depotId">
        <el-select
          v-model="queryParams.depotId"
          placeholder="请选择仓库"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        >
          <el-option
            v-for="depot in depotOptions"
            :key="depot.id"
            :label="depot.name"
            :value="depot.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['report:outStockMonth:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['report:outStockMonth:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['report:outStockMonth:remove']"
          >删除</el-button
        >
      </el-col>
      <!--   <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['report:outStockMonth:export']"
          >导出</el-button
        >
      </el-col> -->
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="outStockMonthList"
      @selection-change="handleSelectionChange"
      max-height="550"
    >
      <el-table-column type="selection" width="55" align="center" />
      <!--  <el-table-column label="报表编号" align="center" prop="code" /> -->
      <el-table-column label="报表名称" align="center" prop="name" />
      <el-table-column
        label="开始时间"
        align="center"
        prop="starttime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.starttime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="结束时间"
        align="center"
        prop="endtime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.endtime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="所属仓库" align="center" prop="depotName" />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row)"
            >查看</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="excelhandleView(scope.row)"
            >导出</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['report:outStockMonth:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['report:outStockMonth:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改仰口备件出库月报对话框 -->
    <el-dialog
      fullscreen
      :title="title"
      :visible.sync="open"
      width="900px"
      append-to-body
      custom-class="myDialog"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <div class="tableHeader">
          <el-row>
            <el-col :span="11">
              <!-- <div class="grid-content bg-purple textLeft">
                {{ data.company || "" }}
              </div> -->
              <div class="grid-content bg-purple textLeft">
                <div class="flex1">
                  <!--                  <el-input-->
                  <!--                    v-model="form.depotName"-->
                  <!--                    placeholder="请输入工厂名称"-->
                  <!--                  />-->
                </div>
              </div>
            </el-col>
            <el-col :span="13">
              <div class="grid-content bg-purple-light textRight">
                <div class="flex">
                  报表编号：
                  <el-input
                    v-model="form.code"
                    placeholder="请输入报表编号"
                    @input="nameChange"
                  />
                </div>
                <!-- <span> 编号：{{ data.code || "" }} </span> -->
              </div>
            </el-col>
          </el-row>
          <el-row>
            <div class="grid-content bg-purple-dark mainTitle">
              <el-date-picker
                :editable="false"
                style="width: 150px !important"
                clearable
                size="small"
                v-model="form.reportMonth"
                type="month"
                format="yyyy年MM月"
                value-format="yyyy-MM-dd"
                placeholder="选择月"
                :disabled="openDisabled"
                @change="changeDateRange"
              >
              </el-date-picker>
              备件出库月报表
            </div>
          </el-row>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="开始日期" prop="starttime">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.starttime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择开始日期"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="结束日期" prop="endtime">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.endtime"
                type="date"
                value-format="yyyy-MM-dd "
                placeholder="选择结束日期"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="所属仓库" prop="depotId">
              <el-select
                v-model="form.depotId"
                placeholder="请选择仓库"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="depot in depotOptions"
                  :key="depot.id"
                  :label="depot.name"
                  :value="depot.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <el-input
                v-model="form.remark"
                type="textarea"
                placeholder="请输入内容"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-divider content-position="center"
          >仰口备件出库月报-备件出库列信息</el-divider
        >
        <el-row :gutter="10" class="mb8">
          <!--          <el-col :span="1.5">-->
          <!--            <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddRptAnalysisSpRecordSub" :disabled="openDisabled">添加</el-button>-->
          <!--          </el-col>-->
          <el-col :span="1.5">
            <el-button
              type="primary"
              icon="el-icon-plus"
              size="mini"
              @click="handleCreateRptRecordSub"
              :disabled="openDisabled"
              >生成</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              icon="el-icon-delete"
              size="mini"
              @click="handleDeleteRptAnalysisSpRecordSub"
              :disabled="openDisabled"
              >删除</el-button
            >
          </el-col>
        </el-row>
        <el-table
          :data="rptAnalysisSpRecordSubList"
          :row-class-name="rowRptAnalysisSpRecordSubIndex"
          @selection-change="handleRptAnalysisSpRecordSubSelectionChange"
          ref="rptAnalysisSpRecordSub"
          max-height="550"
        >
          <!--          <el-table-column type="selection" width="50" align="center" />-->
          <!--          <el-table-column label="序号" align="center" prop="index" width="50"/>-->
          <el-table-column label="所属仓库" prop="depotId" minWidth="100px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.depotName"
                placeholder="请输入所属仓库"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="物资编号" prop="productCode" minWidth="100px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.productCode"
                placeholder="请输入物资编号"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="物资名称" prop="productName" minWidth="100px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.productName"
                placeholder="请输入物资名称"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="单位" prop="unit" width="90px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.unit"
                placeholder="请输入单位"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="规格" prop="model" minWidth="140px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.model"
                placeholder="请输入"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="业务来源" prop="type" minWidth="80px">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.type"
                placeholder="请选择业务来源"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in typeOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                ></el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="出库数量" prop="outNum">
            <template slot-scope="scope">
              <el-input
                type="number"
                v-model="scope.row.outNum"
                placeholder="请输入出库数量"
                :disabled="openDisabled"
                @change="sumNumAndMoney"
              />
            </template>
          </el-table-column>
          <el-table-column label="出库金额" prop="outMoney">
            <template slot-scope="scope">
              <el-input
                type="number"
                v-model="scope.row.outMoney"
                placeholder="请输入出库金额"
                :disabled="openDisabled"
                @change="sumNumAndMoney"
              />
            </template>
          </el-table-column>
          <el-table-column label="结存库存" prop="inventoryNum" width="100px">
            <template slot-scope="scope">
              <el-input
                type="number"
                v-model="scope.row.inventoryNum"
                placeholder="请输入结存库存"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="结存金额" prop="inventoryMoney">
            <template slot-scope="scope">
              <el-input
                type="number"
                v-model="scope.row.inventoryMoney"
                placeholder="请输入结存金额"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="出库人" prop="remark" width="100px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.nickName"
                placeholder="请输入"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
          <el-table-column label="出库时间" prop="remark" minWidth="100px">
            <template slot-scope="scope">
              <el-input
                v-model="scope.row.updateTime"
                placeholder="请输入"
                :disabled="openDisabled"
              />
            </template>
          </el-table-column>
        </el-table>
        <el-col :span="12">
          <el-form-item label="数量合计" prop="totalNum">
            <el-input
              type="number"
              v-model="form.totalNum"
              placeholder="数量合计"
              :disabled="true"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="金额合计" prop="totalMoney">
            <el-input
              type="number"
              v-model="form.totalMoney"
              placeholder="金额合计"
              :disabled="true"
            />
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer" v-if="!openDisabled">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listOutStockMonth,
  getOutStockMonth,
  delOutStockMonth,
  addOutStockMonth,
  updateOutStockMonth,
  getOutStockList,
} from "@/api/report/analysis/outStockMonth";
import { listDepot } from "@/api/equipment/materials/depot";
export default {
  name: "OutStockMonth",
  data() {
    return {
      //弹窗是否禁止编辑
      openDisabled: true,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 子表选中数据
      checkedRptAnalysisSpRecordSub: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 仰口备件出库月报表格数据
      outStockMonthList: [],
      // 仰口备件出库月报-备件出库列表格数据
      rptAnalysisSpRecordSubList: [],
      typeOptions: [],
      // 所属仓库
      depotOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 50,
        reportMonth: null,
        reportMonth1: null,
        code: null,
        name: null,
        starttime: null,
        endtime: null,
        depotId: null,
      },
      // 查询参数
      createQueryParams: {
        starttime: null,
        endtime: null,
        depotId: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        depotId: [{ required: true, message: "不能为空", trigger: "blur" }],
        starttime: [{ required: true, message: "不能为空", trigger: "change" }],
        endtime: [{ required: true, message: "不能为空", trigger: "change" }],
      },
    };
  },
  created() {
    this.getList();
    this.getDicts("out_stock_type").then((response) => {
      this.typeOptions = response.data;
    });
    this.getDepot();
  },
  methods: {
    sumNumAndMoney() {
      let sumNum = 0;
      let sumMoney = 0;
      for (let i = 0; i < this.rptAnalysisSpRecordSubList.length; i++) {
        sumNum = sumNum + Number(this.rptAnalysisSpRecordSubList[i].outNum);
        if (this.rptAnalysisSpRecordSubList[i].type != "04") {
          sumMoney += Number(this.rptAnalysisSpRecordSubList[i].outMoney);
        }
      }
      this.form.totalNum = sumNum;
      this.form.totalMoney = sumMoney;
      this.$forceUpdate();
    },
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "合计";
          return;
        }
        if (index === 6 || index === 7) {
          const values = data.map((item) => Number(item[column.property]));
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr);
              if (!isNaN(value)) {
                return prev + curr;
              } else {
                return prev;
              }
            }, 0);
            if (index === 7) {
              sums[index] += " 元";
            }
          } else {
            sums[index] = "N/A";
          }
        }
      });

      return sums;
    },
    getDepot() {
      this.loading = true;
      let depotParams = {
        type: "01",
      };
      listDepot(depotParams).then((response) => {
        this.depotOptions = response.data;
        this.loading = false;
      });
    },
    /** 查询仰口备件出库月报列表 */
    getList() {
      this.loading = true;
      listOutStockMonth(this.queryParams).then((response) => {
        this.outStockMonthList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        reportMonth: null,
        code: null,
        name: null,
        starttime: null,
        endtime: null,
        depotId: 7,
        delFlag: null,
        remark: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        totalNum: null,
        totalMoney: null,
      };
      this.rptAnalysisSpRecordSubList = [];
      this.resetForm("form");
    },
    changeDateRange() {
      this.form.starttime = this.getPreMonth(this.form.reportMonth);
      this.form.endtime = this.parseTime(this.form.reportMonth, "{y}-{m}-26");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      if (this.queryParams.reportMonth != null) {
        let arr = this.queryParams.reportMonth;
        this.queryParams.reportMonth = arr[0];
        this.queryParams.reportMonth1 = arr[1];
      }
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.openDisabled = false;
      this.open = true;
      this.title = "添加仰口备件出库月报";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.openDisabled = false;
      const id = row.id || this.ids;
      getOutStockMonth(id).then((response) => {
        this.form = response.data;
        this.rptAnalysisSpRecordSubList =
          response.data.rptAnalysisSpRecordSubList;
        this.open = true;
        this.title = "修改仰口备件出库月报";
      });
    },
    /** 查看按钮 */
    handleView(row) {
      this.reset();
      this.openDisabled = true;
      const id = row.id || this.ids;
      getOutStockMonth(id).then((response) => {
        this.form = response.data;
        this.rptAnalysisSpRecordSubList =
          response.data.rptAnalysisSpRecordSubList;
        this.open = true;
        this.title = "查看仰口备件出库月报";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.form.name =
            this.parseTime(this.form.reportMonth, "{y}年{m}月") +
            "仰口备件出库月报表";
          this.form.rptAnalysisSpRecordSubList =
            this.rptAnalysisSpRecordSubList;
          if (this.form.id != null) {
            updateOutStockMonth(this.form).then((response) => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            const rLoading = this.openLoading();
            addOutStockMonth(this.form)
              .then((response) => {
                this.msgSuccess("新增成功");
                this.open = false;
                rLoading.close();
                this.getList();
              })
              .catch((error) => {
                rLoading.close();
              });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm(
        '是否确认删除仰口备件出库月报编号为"' + ids + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delOutStockMonth(ids);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 仰口备件出库月报-备件出库列序号 */
    rowRptAnalysisSpRecordSubIndex({ row, rowIndex }) {
      row.index = rowIndex + 1;
    },
    /** 仰口备件出库月报-备件出库列添加按钮操作 */
    handleAddRptAnalysisSpRecordSub() {
      let obj = {};
      obj.depotId = "";
      obj.productCode = "";
      obj.productName = "";
      obj.unit = "";
      obj.model = "";
      obj.type = "";
      obj.outNum = "";
      obj.outMoney = "";
      obj.inventoryNum = "";
      obj.inventoryMoney = "";
      obj.remark = "";
      this.rptAnalysisSpRecordSubList.push(obj);
    },
    handleCreateRptRecordSub() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.createQueryParams.depotId = this.form.depotId;
          this.createQueryParams.starttime = this.form.starttime;
          this.createQueryParams.endtime = this.form.endtime + " 23:59:59";
          console.log(this.form.endtime);
          getOutStockList(this.createQueryParams).then((response) => {
            this.rptAnalysisSpRecordSubList = response.data;
            if (this.form.totalNum == null || this.form.totalMoney) {
              this.sumNumAndMoney();
            }
          });
        }
      });
    },
    /** 仰口备件出库月报-备件出库列删除按钮操作 */
    handleDeleteRptAnalysisSpRecordSub() {
      if (this.checkedRptAnalysisSpRecordSub.length == 0) {
        this.$alert("请先选择要删除的仰口备件出库月报-备件出库列数据", "提示", {
          confirmButtonText: "确定",
        });
      } else {
        this.rptAnalysisSpRecordSubList.splice(
          this.checkedRptAnalysisSpRecordSub[0].index - 1,
          1
        );
      }
    },
    /** 单选框选中数据 */
    handleRptAnalysisSpRecordSubSelectionChange(selection) {
      if (selection.length > 1) {
        this.$refs.rptAnalysisSpRecordSub.clearSelection();
        this.$refs.rptAnalysisSpRecordSub.toggleRowSelection(selection.pop());
      } else {
        this.checkedRptAnalysisSpRecordSub = selection;
      }
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "report/outStockMonth/export",
        {
          ...this.queryParams,
        },
        "仰口备件出库月报" + this.parseTime(new Date()) + ".xlsx"
      );
    },
    //接收编号
    nameChange(e) {
      this.form.code = e;
    },
    excelhandleView(row) {
      this.download(
        "report/outStockMonth/exportexcel?id=" + row.id,
        {
          ...this.queryParams,
        },
        "备件出库月报表" + this.parseTime(new Date()) + ".xlsx"
      );
    },
    /**
     * 获取上一个月
     *
     * @date 格式为yyyy-mm-dd的日期，如：2014-01-25
     */
    getPreMonth(date) {
      var arr = date.split("-");
      var year = arr[0]; //获取当前日期的年份
      var month = arr[1]; //获取当前日期的月份
      var day = arr[2]; //获取当前日期的日
      // var days = new Date(year, month, 0);
      // days = days.getDate(); //获取当前日期中月的天数
      var year2 = year;
      var month2 = parseInt(month) - 1;
      if (month2 == 0) {
        year2 = parseInt(year2) - 1;
        month2 = 12;
      }
      // var day2 = day;
      // var days2 = new Date(year2, month2, 0);
      // days2 = days2.getDate();
      // if (day2 > days2) {
      //     day2 = days2;
      // }
      if (month2 < 10) {
        month2 = "0" + month2;
      }
      var t2 = year2 + "-" + month2 + "-" + 27;
      return t2;
    },
  },
};
</script>
<style lang="scss" scoped>
.tableHeader {
  width: 100%;
  border-top: 1px solid rgba(31, 179, 255, 0.2);
  border-left: 1px solid rgba(31, 179, 255, 0.2);
  border-right: 1px solid rgba(31, 179, 255, 0.2);
  .el-row {
    padding: 8px 20px;
    color: #ffffff;
    background: rgba(9, 34, 79, 0.22);
    // border-bottom: 1px solid rgba(31, 179, 255, 0.2);
    font-size: 14px;
    .textLeft {
      text-align: left;
    }
    .textRight {
      text-align: right;
    }
    .mainTitle {
      font-size: 20px;
      font-weight: bold;
      text-align: center;
    }
    .subTitle {
      text-align: center;
      font-weight: 100;
    }
  }
}
@media screen and (max-width: 520px) {
  .tableHeader {
    .el-row {
      padding: 8px 5px;
      font-size: 10px;
    }
  }
}
.flex {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  .el-input {
    width: 30%;
  }
}
.flex1 {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  .el-input {
    width: 36%;
  }
}
</style>
>
